package com.tpsix.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tpsix.controller.vm.UserQueryVM;
import com.tpsix.domain.SysUser;
import com.tpsix.dto.DataScope;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SysUserMapper extends BaseMapper<SysUser> {

    @SqlParser(filter = true)
    List<Map<String, Object>> selectRolesAuthorities(Integer userId);

    IPage<SysUser> selectViewableUsers(Page<?> page, @Param("vm") UserQueryVM queryVM, DataScope scope);

}